angular.module('mamApp').factory('AgencyInformationManager', ['$http','api', function ($http,api) {
    var AgencyInformationManager = {
        /**
         * 机构信息添加
         * @param params
         * @returns
         */

        agencyInfoAdd: function (params) {
            return $http.post(api+'/cp/company/companies', params).then(function (result) {
                return result;
            });
        },
        /**
         * 机构信息修改
         * @param params
         * @returns result
         */
        agencyInfoEdit: function (cpId,params) {
            return $http.put(api+'/cp/company/companies/'+cpId, params).then(function (result) {
                return result;
            });
        },

        /**
         * 机构信息
         * @returns result
         */
        agencyInfoDetail: function (cpId) {
            return $http.get(api+'/cp/company/companies/'+cpId).then(function (result) {
                return result;
            });
        }


    };

    return AgencyInformationManager;
}]);
